module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;

    const UserSchema = new Schema({
        userName: { type: String, required: true },
        role: { type: Number, required: true },
        passWord: { type: String, required: true },
        createTime: {
            type: Date,
            default: Date.now
        },
        updateTime: {
            type: Date,
            default: Date.now
        }
    });

    return mongoose.model('User', UserSchema);
}